<?php
/***************************************************************
*  Copyright notice
*  (c) 2009, jianyuzhu@gmail.com
*  All rights reserved
*  This script is part of the PPEMI project.
***************************************************************/

class ContentValidate extends CoreValidate {
	
	//constructor
	function UserValidate() {
		
	}
	
	//methods
	function checkAddItem($data_array) {
		if( $data_array['users_name'] ) {
		
		}
	}
	
	function checkUpdateItem($data_array) {
		if( $this->_str_le($data_array['users_name'], 0) ) {
			$this->_add('users_name', 'Users Name is Null');
		} elseif( $this->_str_le($data_array['users_name'], 5) ) {
			$this->_add('users_name', 'Users Name is less than 5 characters');
		} elseif( $this->_str_gt($data_array['users_name'], 20) ) {
			$this->_add('users_name', 'Users Name is more than 20 characters');
		}
	}
}
//
?>